﻿using SIG.Model.Articles;
using SIG.Model.Shipping;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace SIG.Model.Mapping
{
    public class ProvinceMap: EntityTypeConfiguration<Province>
    {
        public ProvinceMap()
        {
            this.HasKey(b => b.Id);
            this.Property(b => b.Id)
                .HasColumnName("Id")
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
            this.ToTable("T_Province");
            this.Property(p => p.Name).HasMaxLength(50).IsRequired();     
            this.Property(p => p.Sort).IsRequired();          
            this.Property(p => p.Remark).HasMaxLength(50);
           
        }
    }
}
